package cn.itcast.day05.demo02;

public class Demo02StringGet {
    public static void main(String[] args) {
        int length = "asdasgasgasgga".length();
        System.out.println("字符串的长度:" + length);
        String str1 = "Hello ";
        String str2 = "World";
        String str3 = str1.concat(str2);
        System.out.println("拼接之后的字符串为:" + str3);
        char ch = "Hello".charAt(1);
        System.out.println("1号索引位置的字符为:" + ch);
        String original = "Hello World";
        int index = original.indexOf("orld");
        System.out.println("返回的索引为:" + index);
    }
}
